<template>
	<view>
		<uni-nav-bar left-icon="arrowthinleft" title="详情" :border="false" :fixed="true" bg="bg-fff" color="#333" @clickLeft="goBack()"></uni-nav-bar>
		<view class="padding-x-24 padding-y-30">
			<view class="fs-32 color-333">{{info.title}}</view>
			<view class="fs-30 color-zhuse margin-top-16">{{info.income}}元</view>
			<view class="fs-22 color-666 margin-top-16">招{{info.position}} <text class="margin-left-16">{{info.num || 1}}人</text> </view>
			<!-- <view class="flex align-center flex-wrap margin-top-40">
				<view class="fs-20 color-333 bg-f7f7f7 radius48 margin-right-30 margin-bottom-20" style="padding:14rpx 50rpx;">有电视</view>
				<view class="fs-20 color-333 bg-f7f7f7 radius48 margin-right-30 margin-bottom-20"  style="padding:14rpx 50rpx;">有电视</view>
			</view> -->
		</view>
		<view class="bg-f7f7f7 w100" style="height: 10rpx;"></view>
		<view class="padding-24 solid-bottom">
			<view class="fs-30 color-000">职位描述及要求</view>
			<view class="fs-26 color-666 margin-top-10">{{info.describe}}</view>
			<view class="fs-26 color-666 margin-top-10">工作时间: <text class="margin-left-16">{{info.time}}</text></view>
			<view class="fs-26 color-666 margin-top-10">福利待遇: <text class="margin-left-16">{{info.welfare}}</text></view>
			<view class="fs-26 color-666 margin-top-10">工作年限: <text class="margin-left-16">{{info.experience}}</text><text class="margin-left-16">{{info.education}}</text></view>
		</view>
		<view class="padding-24">
			<view class="fs-30 color-000">公司信息</view>
			<view class="fs-26 color-333 margin-top-16">
				<view>{{info.company_name}}</view>
				<view class="fs-26 color-999 margin-top-16">{{info.company_describe}} | {{info.address}}{{info.company_address}}</view>
			</view>
		</view>
		
		<view class="fixed w100 padding-y-24 flex align-center justify-between bg-fff padding-right-24" style="bottom: 0;box-shadow: 0 0 20rpx #eee;">
			<view @click="toCall()" class="w25 text-center">
				<image src="../../static/img/call.png" style="width: 36rpx;height: 36rpx;"></image>
				<view class="fs-26 color-666">电话</view>
			</view>
			<view @click="submit()" class="fs-28 color-fff callBtn  flex1 text-center">申请职位</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				recruit_id:'',
				info:{}
			}
		},
		onLoad(opt) {
			this.recruit_id = opt.id;
			this.getInfo()
		},
		methods:{
			getInfo(){
				this.$api.recruit_detail({recruit_id:this.recruit_id}).then(res=>{
					if(res.code == 1){
						this.info = res.data
					}
				})
			},
			toCall(){
				uni.makePhoneCall({
				    phoneNumber: this.info.mobile
				});
			},
			submit(){
				this.$api.send_resume({recruit_id:this.recruit_id}).then(res=>{
					this.$msg(res.msg)
					if(res.code == 1){
						setTimeout(()=>{
							uni.navigateBack()
						},400)
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.callBtn{
		height: 84rpx;line-height: 84rpx;border-radius: 10rpx; background: linear-gradient(to bottom,#FDA730,#FE810A);
	}
</style>
